using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplicationlal
{

    class Program
    {


        static void Main(string[] args)
        {
            jc();
        }





        //继承作业
        static void jc()
        {
            studen1();
            teachar1();
        }

        class Person {
            public string ID;
            public string name;
            public char sex;
            public string cardid;
            public string tel;
        }


        class teachar: Person
        {

            public string title;
            public string wageno;           
        }
        class studen : Person
        {

            public string major;
            public string grade;           
        }

       

            static void teachar1()
        {
            teachar a = new teachar();
             a.ID="01";
             a.name="张三";
            a.sex='男';
            a.cardid="123123";
            a.tel="123";
            a.title = "体育老师";
            a.wageno = "01";

            Console.WriteLine("姓名：{0}\nID：{1}\n性别：{2}\n身份证号：{3}\n联系方式：{4}\n职位：{5}\n工资号：{6}\n", a.name, a.ID, a.sex,a.cardid,a.tel,a.title,a.wageno);


    }
        static void studen1()
        {
            studen a = new studen();
            a.ID = "01";
            a.name = "张三";
            a.sex = '男';
            a.cardid = "123123";
            a.tel = "123";
            a.major = "清华保安";
            a.grade = "20级";


            Console.WriteLine("姓名：{0}\nID：{1}\n性别：{2}\n身份证号：{3}\n联系方式：{4}\n专业：{5}\n年级：{6}\n", a.name, a.ID, a.sex, a.cardid, a.tel, a.major, a.grade);

        }



        //结构体作业

        static void jg()
        {
            PersonStruct p1;
            p1.name = "张三";
            p1.phone = "100";
            p1.dizhi = "山顶洞";


            PersonStruct p2;

            p2 = p1;
            p2.name = "李四";


            Console.WriteLine("我是{0}，我来自{1}，我的电话是{2}，欢迎打扰！", p1.name, p1.dizhi, p1.phone);


            PersonClass p3 = new PersonClass();
            p3.name = "张三";
            p3.phone = "100";
            p3.dizhi = "山顶洞";


            PersonClass p4 = new PersonClass();

            p4 = p3;
            p4.name = "李四";


            Console.WriteLine("我是{0}，我来自{1}，我的电话是{2}，欢迎打扰！", p3.name, p3.dizhi, p3.phone);

        }
    }

        struct PersonStruct
        {
            public string name;
            public string phone;
            public string dizhi;



        }

        class PersonClass
        {
            public string name = "张三";
            public string phone = "山顶洞";
            public string dizhi = "110";
           

        }



    }

